#!/usr/bin/python
# -*- coding: utf-8 -*-
# @Time    : 2018/7/25 14:28
# @Author  : zerup
import json

from fairy_algo.settings import Log


def parsebody(request_body, key):
    body = json.loads(request_body)
    try:
        value = body.get(key)
        return value
    except:
        Log.error(key + ' not in request body')
        return ''




